//
//  ObjcRuntime.h
//  ITC_iOS
//
//  Created by iBenz on 2018/8/29.
//  Copyright © 2018年 Benz.L. All rights reserved.
//

#ifndef ObjcRuntime_h
#define ObjcRuntime_h

#import <objc/runtime.h>

NS_INLINE void ExchangeInstanceMethod(Class cls, SEL sourceMethod, SEL desMethod) {
    method_exchangeImplementations(class_getInstanceMethod(cls, sourceMethod), class_getInstanceMethod(cls, desMethod));
}

NS_INLINE void ExchangeClassMethod(Class cls, SEL sourceMethod, SEL desMethod) {
    method_exchangeImplementations(class_getClassMethod(cls, sourceMethod), class_getClassMethod(cls, desMethod));
}

#endif /* ObjcRuntime_h */
